<template>
  <view class="content tn-padding-sm" style="padding-bottom: 200rpx;">
    <view class="box">
      <view class="title">{{ details.title }}</view>
      <view class="time">{{ details.createTime }}</view>
      <view class="image-container">
        <img :src="details.content" alt="Uploaded Image" class="responsive-image">
      </view>
    </view>
	<view class="footerBtn tn-b-f" v-if="details.signupAvailable">
		<view class="btn tn-flex tn-flex-row-around tn-flex-col-center">
			<view class="left common-button">
				<view >德韬物业</view>
			</view>
			<view class="right common-button">
				<view @click="nav">申请报名</view>
			</view>
		</view>
	</view>
  </view>
</template>

<script>
import { GetnewsById } from '@/api/consultation/index'

export default {
  data() {
    return {
      details: {},
      id: '',
    }
  },
  onLoad(e) {
    this.id = e.id
  },
  onShow() {
    this.getnewsById()
  },
  methods: {
    getnewsById() {
      let obj = {
        id: this.id
      }
      GetnewsById(obj).then((res) => {
    
          this.details = res.data
     
      });
    }
  }
}
</script>

<style lang="scss" scoped>
.box {
  padding: 40rpx 40rpx;
  background-color: #fff;
}

.title {
  font-size: 55rpx;
  font-weight: 600;
}

.image-container {
  width: 100%;
  max-width: 600px; /* 最大宽度，可以根据需要调整 */
  min-height: 120vh;
  overflow: hidden; /* 隐藏溢出部分 */
}

.responsive-image {
  width: 100%; /* 图片宽度占满容器 */
  min-height: 120vh;
  display: block; /* 去除图片底部空白 */
}

.time {
  font-size: 40rpx;
  color: #dcdcdc;
  margin: 35rpx 0;
}
.footerBtn {
		position: fixed;
		left: 0;
		bottom: 0;
		width: 100%;

		.btn {
			height: 100rpx;
			width: 100%;
			height: 100rpx;
			.common-button {
				border-radius: 20rpx;
				width: 300rpx;
				height: 80rpx;
				font-size: 36rpx;
				line-height: 80rpx;
				text-align: center;
				color: #fff;
				margin: auto;
			}

			.left {
				// background-color: #18dd8b;
				color: #3d3d3d;
				text-align: left;
				font-size: 28rpx;
			}

			.right {

				background-color: #1634dd;

			}
		}
	}
</style>